-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report: handle on-fatalerror better #32207
report: handle on-fatalerror better #32207
Conversation
ae976b0
to
a0df730
Compare
src/node_options.cc
Outdated
errors->push_back("--report-on-fatalerror option is valid only when " | ||
"--experimental-report is set"); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one extra change I am doing than #29881, to fix the issue mentioned in #29881 (comment)
This PR complements #32242 (though there will be many conflicts to resolve) , to make it stable with the last known bug being addressed. Request reviews, so that it can land along side before v14 d-cut! |
src/node_options.cc
Outdated
@@ -86,6 +86,11 @@ void PerIsolateOptions::CheckOptions(std::vector<std::string>* errors) { | |||
return; | |||
} | |||
|
|||
if (per_process::cli_options->report_on_fatalerror) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should omit this, as #32242 makes it unnecessary, as previously noted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjihrig, removed this block. PTAL.
src/node_options.cc
Outdated
@@ -706,6 +701,13 @@ PerProcessOptionsParser::PerProcessOptionsParser( | |||
"print V8 command line options", | |||
&PerProcessOptions::print_v8_help); | |||
|
|||
#ifdef NODE_REPORT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, #32242 will make the #ifdef NODE_REPORT
unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed #ifdef NODE_REPORT
.
helper.validate(report); | ||
})); | ||
const spawnSync = require('child_process').spawnSync; | ||
let args = ['--experimental-report', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--experimental-report
can be dropped due to #32242.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed --experimental-report
from args list.
const report = reports[0]; | ||
helper.validate(report); | ||
|
||
args = ['--max-old-space-size=20', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment here. Something along the lines of // Verify that reports are not created on fatal error by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added suggested comment in test case. PTAL.
cc0c963
to
8d71449
Compare
In test/report/test-report-fatal-error.js, linter error saying common is assigned but not used, I couldn't find proper place to use it in test case. |
Instead of |
@cjihrig, thanks. Fixed the error with your suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me.
@HarshithaKP This looks pretty much ready to land, but it needs a trivial rebase before a final CI. Ping me when you've done it and I'll kick that off. EDIT: Alternatively, give me permissions and I'll do it: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests |
--report-on-fatalerror was not honored properly, as there was no way to check the value which was stored in the Environment pointer which can be inaccessible under certain fatal error situations. Move the flag out of Environment pointer so that this is doable. Co-authored-by: Shobhit Chittora [email protected] Fixes: nodejs#31576 Refs: nodejs#29881
5e9fdd9
to
7dbc5de
Compare
@sam-github, thanks. Rebased it. PTAL. |
Overlooked in 2fa74e3. Refs: nodejs#32207
Follow on to nodejs#32207, 3 other options are also not respected under situations that the isolate is not available.
Follow on to #32207, 3 other options are also not respected under situations that the isolate is not available. PR-URL: #32497 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Follow on to #32207, 3 other options are also not respected under situations that the isolate is not available. PR-URL: #32497 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Overlooked in 2fa74e3. Refs: #32207 PR-URL: #32535 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Overlooked in 2fa74e3. Refs: #32207 PR-URL: #32535 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Overlooked in 2fa74e3. Refs: #32207 PR-URL: #32535 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
--report-on-fatalerror was not honored properly, as there was no way to check the value which was stored in the Environment pointer which can be inaccessible under certain fatal error situations. Move the flag out of Environment pointer so that this is doable. Co-authored-by: Shobhit Chittora [email protected] PR-URL: nodejs#32207 Fixes: nodejs#31576 Refs: nodejs#29881 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
Follow on to nodejs#32207, 3 other options are also not respected under situations that the isolate is not available. PR-URL: nodejs#32497 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Overlooked in 2fa74e3. Refs: nodejs#32207 PR-URL: nodejs#32535 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
--report-on-fatalerror was not honored properly, as there was no way to check the value which was stored in the Environment pointer which can be inaccessible under certain fatal error situations. Move the flag out of Environment pointer so that this is doable. Co-authored-by: Shobhit Chittora [email protected] PR-URL: #32207 Fixes: #31576 Refs: #29881 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
Follow on to #32207, 3 other options are also not respected under situations that the isolate is not available. PR-URL: #32497 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Overlooked in 2fa74e3. Refs: #32207 PR-URL: #32535 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
The property `process.report.reportOnFatalError` was deemed experimental, as it was not honored under certain scenarios (for example out of memory conditions). The report configuration were previously stored on the `environment` structure which was not available on these types of fatal error cases. The referenced PR has addressed this case (sometime back), and the property is working as intended. Refs: nodejs#32207 PR-URL: nodejs#35654 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
The property `process.report.reportOnFatalError` was deemed experimental, as it was not honored under certain scenarios (for example out of memory conditions). The report configuration were previously stored on the `environment` structure which was not available on these types of fatal error cases. The referenced PR has addressed this case (sometime back), and the property is working as intended. Refs: #32207 PR-URL: #35654 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
The property `process.report.reportOnFatalError` was deemed experimental, as it was not honored under certain scenarios (for example out of memory conditions). The report configuration were previously stored on the `environment` structure which was not available on these types of fatal error cases. The referenced PR has addressed this case (sometime back), and the property is working as intended. Refs: #32207 PR-URL: #35654 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
The property `process.report.reportOnFatalError` was deemed experimental, as it was not honored under certain scenarios (for example out of memory conditions). The report configuration were previously stored on the `environment` structure which was not available on these types of fatal error cases. The referenced PR has addressed this case (sometime back), and the property is working as intended. Refs: #32207 PR-URL: #35654 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
--report-on-fatalerror was not honored properly, as there was no
way to check the value which was stored in the Environment pointer
which can be inaccessible under certain fatal error situations.
Move the flag out of Environment pointer so that this is doable.
Co-authored-by: Shobhit Chittora [email protected]
Fixes: #31576
Refs: #29881
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes